def solve(numbers, target):
    l = 0
    r = len(numbers) - 1
    while (l < r):
        if numbers[l] + numbers[r] == target:
            return [l + 1, r + 1]
        elif numbers[l] + numbers[r] < target:
            l += 1
        else:
            r -= 1

    return None


if __name__ == "__main__":
    numbers = [2, 7, 11, 15]
    target = 9
    print(solve(numbers, target))
